PROJECT(CONEX-Dal)

#find xerces package
FIND_PACKAGE(XERCESC REQUIRED)

#add the files to our groups and core
SOURCE_GROUP("dal" ./dal/*)
SOURCE_GROUP("dal-db" ./dal/db/*)
SOURCE_GROUP("dal-xml" ./dal/xml/*)
#seems to be a bug in cmake, can't put these in analysis\\standard folder :(
#dal detail

SET(CONEX-Dal_Files
	#for example 
	#./control/ControlSynset.cpp	
	./dal/VocabularyAccess.cc
	./dal/VocabularyAccessFactory.cc
#	./dal/db/VocabularyDbAccess.cc	
	./dal/xml/VocabularyXmlAccess.cc
	./dal/xml/VocabularySax2Handler.cc
	./dal/xml/XmlHandler.cc
	./dal/xml/VocabularyXmlHandler.cc
	./dal/xml/TermXmlHandler.cc
	./dal/xml/TermContextXmlHandler.cc
	./dal/xml/IdXmlHandler.cc
	./dal/xml/StructureXmlHandler.cc
	./dal/xml/ConceptXmlHandler.cc
)


#find our headers
file(GLOB_RECURSE HEADERS ${CONEX-Dal_SOURCE_DIR}/*.h)


#create the libraries
INCLUDE_DIRECTORIES( ${CONEX_SOURCE_DIR}/src/dal 
                     ${CONEX_SOURCE_DIR}/src/model
					 ${CONEX_SOURCE_DIR}/src/util
					 ${XERCESC_INCLUDE_DIR})

#add_executable(CONEX-App
#	${CONEX-App_Files} ${HEADERS}
#)

add_library(CONEX-Dal
    STATIC
	 ${CONEX-Dal_Files} ${HEADERS}
	)
	
#set properties on the libraries
SET_TARGET_PROPERTIES(CONEX-Dal PROPERTIES
    VERSION ${CONEX_VERSION}
    SOVERSION ${CONEX_SOVERSION}
    COMPILE_DEFINITIONS_DEBUG _DEBUG
)

#SET_TARGET_PROPERTIES( CONEX-Dal PROPERTIES COMPILE_FLAGS "${CONEX-Dal_SOURCE_DIR}/dal/db/otlv4.h" )
#SET_TARGET_PROPERTIES( CONEX-Dal PROPERTIES LINK_FLAGS "odbc32.lib" )



